<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>Chameleon-Mini: The chameleon command line</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Chameleon-Mini
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="index.html">index</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">The chameleon command line </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The Chameleon-Mini enumerates as a CDC-ACM virtual serial interface. For a high level of compatibility to be both interfaced by a human as well as a user application, it supports a text-based command line, which can be accessed by using simple terminal software like hyper-terminal or teraterm. The serial settings, as in baudrate, stopp and parity bits are ignored on the Chameleon side. Note that there is no echo of entered characters at the Chameleon.</p>
<h1>Command structure </h1>
<p>Each of the following commands can result into 3 actions, depending on the character that is appended to it.</p>
<ul>
<li><code>&lt;COMMAND&gt;?</code>: Indicates a request that will always return an information</li>
<li><code>&lt;COMMAND&gt;=&lt;VALUE&gt;</code>: Indicates to set a value on the Chameleon</li>
<li><code>&lt;COMMAND&gt;</code>: Indicates to execute a procedure on the Chameleon with an optional response</li>
</ul>
<p>Note that some commands only support a subset of these 3 actions.</p>
<p>In order to perform the desired command action the command has to be suffixed with a carriage return (CR, 0D hexadecimal). In order to be more user-friendly when interfacing the Chameleon with a serial terminal, support for the backspace (08 hexadecimal) and escape (1B hexadecimal) key have been added. Any other control character as defined in the ASCII character set is ignored. Furthermore the Chameleon does not distinguish between uppercase and lowercase.</p>
<h1>Supported Commands </h1>
<p>The following list shows the supported commands and how they are used. </p>
<table class="doxtable">
<tr>
<th>Command </th><th>Description  </th></tr>
<tr>
<td><code>VERSION?</code> </td><td>Requests the version of the Chameleon </td></tr>
<tr>
<td><code>RESET</code> </td><td>Resets the Chameleon </td></tr>
<tr>
<td><code>UPGRADE</code> </td><td>Sets the Chameleon into firmware upgrade mode (DFU) </td></tr>
<tr>
<td><code>CONFIG</code> </td><td>Returns a comma-separated list of all supported configurations </td></tr>
<tr>
<td><code>CONFIG?</code> </td><td>Returns the currently used configuration </td></tr>
<tr>
<td><code>CONFIG=&lt;NAME&gt;</code> </td><td>Sets the current configuration to <code>&lt;NAME&gt;</code> (See Page_Configurations) </td></tr>
<tr>
<td><code>UIDSIZE?</code> </td><td>Returns the size of the current configuration's UID </td></tr>
<tr>
<td><code>UID?</code> </td><td>Returns the currently set UID </td></tr>
<tr>
<td><code>UID=&lt;UID&gt;</code> </td><td>Sets a new UID to be used in hexadecimal notation </td></tr>
<tr>
<td><code>READONLY?</code> </td><td>Returns the current state of the read-only mode </td></tr>
<tr>
<td><code>READONLY=[0;1]</code> </td><td>Activates or deactivates the read-only mode (Any writing to the memory is silently ignored) </td></tr>
<tr>
<td><code>MEMSIZE?</code> </td><td>Returns the memory size of the current configuration </td></tr>
<tr>
<td><code>UPLOAD</code> </td><td>Waits for an XModem connection to be established in order to upload a memory dump upto the memory size </td></tr>
<tr>
<td><code>DOWNLOAD</code> </td><td>Waits for an XModem connection to be established in order to download a memory dump with exactly the memory size </td></tr>
<tr>
<td><code>BUTTON</code> </td><td>Returns a comma-separated list of supported button press actions for the button </td></tr>
<tr>
<td><code>BUTTON?</code> </td><td>Returns the currently set button press action for BUTTON0 </td></tr>
<tr>
<td><code>BUTTON=&lt;NAME&gt;</code> </td><td>Sets the current button press action for BUTTON0 </td></tr>
<tr>
<td><code>SETTING?</code> </td><td>Returns the currently activated setting of the chameleon-mini </td></tr>
<tr>
<td><code>SETTING=&lt;NUMBER&gt;</code> </td><td>Sets the active setting of the chameleon-mini </td></tr>
<tr>
<td><code>CLEAR</code> </td><td>Clears the entire memory of the currently activated setting </td></tr>
</table>
<h1>Responses </h1>
<p>Subsequent to ANY send command, the Chameleon responds with a status number and status message, separated by a colon and terminated with a carriage return and line feed (CR+LF, 0D+0A hexadecimal). Status numbers are of a 3 digit decimal format with the first digit showing the severity of the answer. Status numbers beginning with a '1' denote an informational item and those beginning with a '2' denote an error. </p>
<table class="doxtable">
<tr>
<th>Response </th><th>Description  </th></tr>
<tr>
<td><code>100:OK</code> </td><td>The command executed successfully </td></tr>
<tr>
<td><code>101:OK WITH TEXT</code> </td><td>The command executed successfully and this answer is appended with an additional line of information, terminated with CR+LF </td></tr>
<tr>
<td><code>110:WAITING FOR XMODEM</code> </td><td>The Chameleon is waiting for an XMODEM connection to establish </td></tr>
<tr>
<td><code>200:UNKNOWN COMMAND</code> </td><td>This command is unknown to the Chameleon </td></tr>
<tr>
<td><code>201:INVALID COMMAND USAGE</code> </td><td>This action is not supported by this command </td></tr>
<tr>
<td><code>202:INVALID PARAM</code> </td><td>The format or value of the given parameter value is invalid </td></tr>
</table>
<h1>Accessing the command-line using a terminal software </h1>
<p>In order to have quick access to the Chameleon's command-line without using any complicated software, we suggest using the TeraTerm terminal emulation software available for windows based operating systems.</p>
<h2>Connecting and setting up </h2>
<p>For establishing a connection to the Chameleon's command line, select File -&gt; New Connection, choose the virtual serial port of the Chameleon and hit the "OK" button. TeraTerm now tries to open the serial port and should succeed without any error.</p>
<p>For easier use of the command-line using a terminal software the local-echo functionality should be activated, to be able to see what is typed into the chameleon. When using TeraTerm, this can be achieved by selecting Setup -&gt; Terminal and check "Local Echo".</p>
<h2>Uploading and Downloading dump files </h2>
<p>In some configurations of the Chameleon, it is necessary to upload a card dump before it can be accessed by a reader. For doing so, the relatively simple and widely known XMODEM protocol is used.</p>
<p>To upload a dump file using TeraTerm, follow these steps.</p>
<ol type="1">
<li>Enter <code>UPLOAD</code> and wait for the <code>110:WAITING FOR XMODEM</code> response</li>
<li>Select File -&gt; Transfer -&gt; XMODEM -&gt; Send</li>
<li>In the dialog choose the binary dumpfile to be uploaded and make sure the option "Checksum" is checked in the lower left corner</li>
<li>Hitting the "Open" button will start the transfer. If no error is given to the user, the file has been uploaded sucessfully.</li>
</ol>
<p>To download the Chameleon's memory again, follow the instructions above except for using <code>DOWNLOAD</code> instead of <code>UPLOAD</code> and the Receive function of TeraTerm</p>
<p>Note that there is a 10 second timeout after entering <code>UPLOAD</code> respectively <code>DOWNLOAD</code> after which the standard command-line is activated again. So try again if the timeout is already over when the XMODEM transfer is about to start. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 2 2014 10:08:12 for Chameleon-Mini by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
